package com.qf.pojo;

import com.qf.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @ClassName Subitem
 * @Description TODO
 * @Author Windy
 * @Date 2022/8/25 14:27
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Subitem {
    /**
     * CREATE TABLE `subitem` (
     *   `suid` varchar(32) NOT NULL,
     *   `sname` varchar(50) NOT NULL,
     *   `starttime` datetime DEFAULT NULL,
     *   `endtime` datetime DEFAULT NULL,
     *   `pid` int(11) DEFAULT NULL,
     *   `updatetime` datetime DEFAULT NULL,
     *   `status` int(11) DEFAULT '1',
     *   PRIMARY KEY (`suid`)
     * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
     */
    private String suid;
    private String sname;
    private String starttime;
    private String endtime;
    private int pid;
    private String updatetime;
    private int status;

    private List<Item> items;

    @Override
    public String toString() {
        return "Subitem{" +
                "suid='" + suid + '\'' +
                ", sname='" + sname + '\'' +
                ", starttime='" + starttime + '\'' +
                ", endtime='" + endtime + '\'' +
                ", pid=" + pid +
                ", updatetime='" + updatetime + '\'' +
                ", status=" + status +
                "\nitems=\n" + ArrayUtil.changeArray(items) +
                '}';
    }
}
